#pragma once
#include <QDialog>

class QButtonGroup;
class QDate;
class QGridLayout;
class QVBoxLayout;
class QHBoxLayout;

class DialogCalendar :
	public QDialog
{
	Q_OBJECT
public:
	DialogCalendar(QWidget * parent = 0,	Qt::WFlags f = 0);
	const QDate& date(void);
public:
	~DialogCalendar(void);
private slots:
	void daySelected(int i);
	void monthSelected(int i);
	void yearSelected(int i);
private:
	QButtonGroup*		 m_buttonGroup;
	QDate				*m_date;
	QGridLayout			*m_grid;
	QVBoxLayout			*m_vl;
	QHBoxLayout			*m_hl;
	void refresh(QDate* date);
private:
	void createButtonGroup(void);
private:
	void createHeader(void);
	void createYearAndMonth(void);
private:
	void createButtons(void);

};
